﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DVK.SP2007
{
    /// <summary>
    /// Gets user information from different sources.
    /// <remarks>
    /// Currently we have implemented two versions:
    ///     Gets user information from user profiles in Moss.
    ///     Gets user information from User Information List in WSS (not by default, requires some changes).
    ///     
    /// Normally it uses the UserInfoFieldMapping as an input in constructor.
    /// </remarks>
    /// </summary>
    /// <typeparam name="IdentifierType">The type of the identifier type.</typeparam>
    public interface IUserInfoManager<IdentifierType>
    {
        /// <summary>
        /// Gets the user info from some source.
        /// </summary>
        /// <param name="identifier">The identifier (loginname, userid, ..).</param>
        /// <returns>instance of person metadata with valid information or throws exception.</returns>
        PersonMetadata GetUserInfo(IdentifierType identifier);
    }
}
